package com.hotel_management_backstage.lin.controller;

import com.hotel_management_backstage.lin.entity.SysMenu;
import com.hotel_management_backstage.lin.result.RespBean;
import com.hotel_management_backstage.lin.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
public class MenuController {

    @Autowired
    private SysMenuService sysMenuService;

    @GetMapping("/api/menu")
    public RespBean menu(HttpServletRequest request){
        return RespBean.success("", sysMenuService.getMenusByCurrentUser(request));
    }
}
